<?php get_header(); ?>

<?php if (have_posts()) : ?>
	
	<?php $post = $posts[0]; ?>
	
	<ul id="posts">
	 	<li class="post">
	 		<div class="post_content">
	 			<h2 class="title">
	 			<?php if (is_category()) { ?>				
					分类  &raquo; <?php echo single_cat_title(); ?>

	  			<?php } elseif(is_tag()) { ?>
					标签  &raquo; <?php single_tag_title(); ?>
 	  			<?php } elseif (is_day()) { ?>
					分类  &raquo; <?php the_date(); ?>
				<?php } elseif (is_month()) { ?>
					分类 &raquo; <?php the_time('Y年m月'); ?>
				<?php } elseif (is_year()) { ?>
					分类  &raquo; <?php the_time('Y年'); ?>
				<?php } elseif (is_author()) { ?>
				<?php 
					if(isset($_GET['author_name'])) :
						$curauth = get_userdatabylogin($author_name); 
					else :
						$curauth = get_userdata(intval($author));
					endif;
				?>
				<?php echo $curauth->display_name; ?> 的所有文章
				<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
					存档
				<?php } ?>
	 			</h2>
	 			<div class="txt"></div>
	 		</div>
	 	</li>
	</ul>
	
	


<?php while (have_posts()) : the_post(); ?>
	<ul id="posts">
		<li class="post">
	 		<div class="post_content" id="post-<?php the_ID(); ?>">
	 			<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
	 			<div class="txt"><?php the_excerpt() ?></div>
	 		</div>
	 		<div class="post_info">
	 			<span class="post_time"><?php esc_attr( the_time('Y-m-d') ); ?></span>
	 			<span class="post_category"><?php printf('%s', get_the_category_list(', ')); ?></span>
	 			<span class="post_tags"><?php the_tags('',', ',''); ?></span>
	 		<div>
	 	</li>
	</ul>

<?php endwhile; else :

	echo walleve_404_message(); 

endif; ?>


	<?php if(!(is_page() || is_single()) ){ ?>
		<div id="pagenav">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
		</div>
	<?php } ?>


<?php get_footer(); ?>